package com.managedbeans;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.PostConstruct;

import com.bo.User;
import com.service.UserService;

public class UserController {

	private User user;
	private UserService userService;
	private List<User> listeUser = new ArrayList<User>();

	@PostConstruct
	public void populate() {
		System.out.println("------>Postconstruct");
		listeUser = userService.getAll();
		System.out.println(listeUser.size());
	}

	public UserController() {
		

	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public UserService getUserService() {
		return userService;
	}

	public void setUserService(UserService userService) {
		this.userService = userService;
	}

	public List<User> getListeUser() {
		return listeUser;
	}

	public void setListeUser(List<User> listeUser) {
		this.listeUser = listeUser;
	}

}
